﻿namespace Ayatta.Contract.Domain
{
    /// <summary>
    /// 折扣分配
    /// </summary>
    public enum DiscountAssignedTo : byte
    {
        /// <summary>
        /// 关联到订单总额
        /// </summary>
        OrderTotal = 0,

        /// <summary>
        /// 关联到订单小计
        /// </summary>
        OrderSubTotal = 1,

        /// <summary>
        /// 关联到商品分类
        /// </summary>
        Category = 2,

        /// <summary>
        /// 关联到商品
        /// </summary>
        Item = 3,

        /// <summary>
        /// 关联到商品Sku
        /// </summary>
        Sku = 4,

        /// <summary>
        /// 关联到运输方式
        /// </summary>
        Shipping = 5

    }

    /// <summary>
    /// 折扣限制
    /// </summary>
    public enum DiscountLimitation : byte
    {
        /// <summary>
        /// 无限制
        /// </summary>
        Unlimited = 0,
        /// <summary>
        /// 只能使用N次
        /// </summary>
        NTimesOnly = 1,
        /// <summary>
        /// 每个用户只能使用N次
        /// </summary>
        NTimesPerCustomer = 2,
    }

    public enum DiscountRequirementRule : byte
    {
        HadSpentAmount = 1,
        PurchasedOneProduct = 2,
        PurchasedAllProducts = 3,
        HasOneProduct = 4,
        HasAllProducts = 5,
        UserRoles = 6,
        ShipppingAreaIds = 7
    }

}